/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package net.qunzhi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@SpringBootApplication
public class WaterNetworkApplication implements WebMvcConfigurer {

	public static void main(String[] args) {
		SpringApplication.run(WaterNetworkApplication.class, args);
	}

	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/static/**")
				.addResourceLocations("classpath:/static/");

		registry.addResourceHandler("/logs/**")
				.addResourceLocations("file:/logs/");

		registry.addResourceHandler("/file/**")
				.addResourceLocations("file:/file/");
	}
}